namespace MyBlog.DataEntity
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    public partial class Tbl_Account
    {
        public Tbl_Account()
        {
            Tbl_Album = new HashSet<Tbl_Album>();
            Tbl_Article = new HashSet<Tbl_Article>();
            Tbl_Message = new HashSet<Tbl_Message>();
            Tbl_Mood = new HashSet<Tbl_Mood>();
            Tbl_Category = new HashSet<Tbl_Category>();
            Tbl_Tag = new HashSet<Tbl_Tag>();
            MyConcernUsers = new HashSet<Tbl_Concerns>();
            ConcernMeUsers = new HashSet<Tbl_Concerns>();
            MyNotices = new HashSet<Tbl_Notice>();
        }

        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        [Key]
        [StringLength(20)]
        public string Account { get; set; }

        [Required]
        [StringLength(250)]
        public string Password { get; set; }

        [StringLength(50)]
        public string UserName { get; set; }

        [StringLength(50)]
        public string NickName { get; set; }

        [Column(TypeName = "date")]
        public DateTime? Birthday { get; set; }

        public bool? Sex { get; set; }

        [StringLength(150)]
        public string Native { get; set; }

        [StringLength(10)]
        public string Education { get; set; }

        [StringLength(50)]
        public string Profession { get; set; }

        [StringLength(50)]
        public string Email { get; set; }

        public int? ConstellationId { get; set; }

        public int? HeadId { get; set; }

        public string PersonalProfile { get; set; }

        public string WantSay { set; get; }

        public bool IsAdmin { get; set; }

        public DateTime RegTime { get; set; }

        public DateTime LastLoginTime { get; set; }

        [ForeignKey("HeadId")]
        public virtual Tbl_Header Tbl_Header { get; set; }

        public virtual ICollection<Tbl_Album> Tbl_Album { get; set; }

        public virtual ICollection<Tbl_Article> Tbl_Article { get; set; }

        public virtual ICollection<Tbl_Message> Tbl_Message { get; set; }

        public virtual ICollection<Tbl_Mood> Tbl_Mood { get; set; }

        public virtual ICollection<Tbl_Category> Tbl_Category { get; set; }

        public virtual ICollection<Tbl_Tag> Tbl_Tag { get; set; }

        public virtual ICollection<Tbl_Concerns> MyConcernUsers { set; get; }

        public virtual ICollection<Tbl_Concerns> ConcernMeUsers { set; get; }

        public virtual ICollection<Tbl_Notice> MyNotices { set; get; }

        public string Motto { set; get; }

        public bool IsActive { set; get; }

        public string ActiveCode { set; get; }

        public string Template { set; get; }
    }
}
